/**
 * 
 */
package runner;

import java.io.IOException;

import segmentation.border_follow.LuminanceChannelEdgeFollower;

import image.bmp.BMPImage;
import image.bmp.BinaryImage;

import loader.ImageLoader;

/**
 * @author nquangtrung
 *
 */
public class EdgeTester {

	public static final String TAG = "EdgeTester";
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			BMPImage image;
			image = ImageLoader.loadBMP("./image/edge.bmp");			
			
			
			LuminanceChannelEdgeFollower follower = new LuminanceChannelEdgeFollower(image);
			int[][] map = follower.follow();
			BinaryImage binimg = new BinaryImage(map, image.getWidth(), image.getHeight());
			// Log.debugArray(TAG, "Border", map, image.getWidth(), image.getHeight());
			
			Displayer wform = new Displayer(binimg);
			wform.setVisible(true);
			wform.pack();
			System.out.println("Finished!");
		} catch (IOException e) {
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
	}

}
